package cn.chenc.framework.core.model;



import java.io.Serializable;
import java.util.Set;

/**
 * 　@description: 登录用户信息
 * 　@author secret
 * 　@date 2021/4/8 10:01
 *
 */
public class LoginUser implements AbstractLoginUser,Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户唯一标识
     */
    private String token;

    /**
     * 用户名id
     */
    private Long userid;


    /**
     * 登录时间
     */
    private Long loginTime;

    /**
     * 过期时间
     */
    private Long expireTime;

    /**
     * 登录IP地址
     */
    private String ipaddr;

    /**
     * 登录地点
     */
    private String loginLocation;

    /**
     * 浏览器类型
     */
    private String browser;

    /**
     * 操作系统
     */
    private String os;

    /**
     * 权限列表
     */
    private Set<String> permissions;

    /**
     * 角色列表
     */
    private Set<String> roles;

    /**
     * 用户信息
     */
    private LoginUserDetails user;

    public LoginUser(){

    }

    @Override
    public String getToken()
    {
        return token;
    }

    @Override
    public void setToken(String token)
    {
        this.token = token;
    }

    public Long getUserid()
    {
        return userid;
    }

    public void setUserid(Long userid)
    {
        this.userid = userid;
    }

    @Override
    public String getUsername(){
        return user.getUsername();
    }

    public String getPassowrd(){
        return user.getPassword();
    }

    @Override
    public Long getLoginTime()
    {
        return loginTime;
    }

    @Override
    public void setLoginTime(Long loginTime)
    {
        this.loginTime = loginTime;
    }

    @Override
    public Long getExpireTime()
    {
        return expireTime;
    }

    @Override
    public void setExpireTime(Long expireTime)
    {
        this.expireTime = expireTime;
    }

    @Override
    public String getIpaddr()
    {
        return ipaddr;
    }

    @Override
    public void setIpaddr(String ipaddr)
    {
        this.ipaddr = ipaddr;
    }

    @Override
    public String getLoginLocation() {
        return loginLocation;
    }

    @Override
    public void setLoginLocation(String loginLocation) {
        this.loginLocation = loginLocation;
    }

    @Override
    public String getBrowser() {
        return browser;
    }

    @Override
    public void setBrowser(String browser) {
        this.browser = browser;
    }

    @Override
    public String getOs() {
        return os;
    }

    @Override
    public void setOs(String os) {
        this.os = os;
    }

    @Override
    public Set<String> getPermissions()
    {
        return permissions;
    }

    @Override
    public void setPermissions(Set<String> permissions)
    {
        this.permissions = permissions;
    }

    @Override
    public Set<String> getRoles() {
        return roles;
    }

    @Override
    public void setRoles(Set<String> roles) {
        this.roles = roles;
    }

    @Override
    public LoginUserDetails getUser()
    {
        return user;
    }

    @Override
    public void setUser(LoginUserDetails user)
    {
        this.user = user;
    }


}
